package com.lxy.user.controller;


import com.lxy.api.client.EquipmentClient;
import com.lxy.common.domain.common.R;
import com.lxy.common.domain.vo.RobotVO;
import com.lxy.user.service.RobotService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@Api(tags = "巡逻机器人相关接口")
@RestController
@RequiredArgsConstructor
@RequestMapping("/robot")
public class RobotController {
    private final RobotService robotService;
    private final EquipmentClient equipmentClient;

    @ApiOperation("发送预警")
    @PostMapping("/sendAlerts")
    public R sendAlerts(@RequestBody RobotVO robotVO){
        return equipmentClient.sendAlerts(robotVO);
    }
}
